home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 2
/
Mac Magazin and MacEasy Magazine CD - Issue 02.iso
/
CD Extras
/
The Cruncher 1.1 Demo folder
/
Tutorial Folder
/
Help Wanted
/
Help Wanted.rsrc
/
TEXT_128.txt
< prev
next >
Wrap
Text File
|
1994-04-15
|
25KB
|
1,229 lines
/* Help wanted.s - tutorial 12/16/93 FINAL */
play(;i)
{
gTESTING = 0;
gInitialized = 0;
gSndChannel = 0;
gCurCheck = 1;
gDidTheMenu = 0;
gStep24ErrFlag = 0;
MenusOnOff(0); /* turn off menus */
MakeCheckBoxes();
SetCurCell(1,1);
StartBtn = NewAnimation(190, 218, 10, 2);
gAlreadyStarted = 0;
Pointer = NewAnimation(ARecX(StartBtn)-41, ARecY(StartBtn)+6, 20, 2);
gWaitFireClick = 0;
gFireCount = 0;
FireEngine = NewAnimation(0, -200, 174, 1);
FireBalloon = NewAnimation(0, -200, 190, 1);
FireLight1 = NewAnimation(0, -200, 182, 1);
FireLight2 = NewAnimation(0, -200, 182, 1);
FireSpeech = NewAnimation(0, -200, 2, 1);
FireClickMe = NewAnimation(0, -200, 210, 1);
SetIdle(2, "OpeningIdle");
}
/*-----------------------*/
DoTest(;ani)
{
gCurCheck = 20;
NBScrollForRange(102, 112);
// PointToNextStep();
// gStep24ErrFlag = 0;
SetIdle(2, "Step20");
}
/*-----------------------*/
OpeningIdle(;ani)
{
HoldMouseDowns(1);
CancelIdle("OpeningIdle");
gInitialized = 1;
HoldMouseDowns(0);
ani = GetStickerAnim(2, 2);
SheBopDanceStart(ani, 2);
SheBopDance(ani, 2);
}
/*************** FIRE ERROR STUFF ********************/
FireError(errCode; )
{
/* 101 => wrong cell */
/* 102 => bad entry */
/* 103 => missing (=) */
/* 104 => bring ss front */
gFireCount += 1;
if ((errCode != 101) || (gFireCount >= 2)) {
HoldMouseDowns(1);
DisableActions();
gFireCount = 0;
SetIdle(2, "FireIdle");
gFireCode = errCode;
gWaitFireClick = 1;
} else
DoBeep();
}
/*-----------------------*/
FireIdle(errCode; )
{
CancelIdle("FireIdle");
FireEntrance(gFireCode);
gWaitFireClick = 1;
}
/*-----------------------*/
FireEntrance(errCode; right, width)
{
HoldMouseDowns(1);
right = GetSSRight();
gWidth = right - GetSSLeft();
AMoveTo(FireEngine, right-(gWidth/2) + 40, GetSSBottom()-72);
Wait(FireEngine);
gSndChannel = PlayConsecutiveSound(92, gSndChannel); /* Scram */
AMove(FireEngine, -60, 0);
Wait(FireEngine);
gSndChannel = PlayConsecutiveSound(204, gSndChannel); /* whistle */
SetSprite(FireEngine, 172);
AMoveTo(FireBalloon, ARecX(FireEngine)-164, ARecY(FireEngine)-33);
Wait(FireBalloon);
AMoveTo(FireLight1, ARecX(FireBalloon)+142, ARecY(FireBalloon)+65);
AMoveTo(FireLight2, ARecX(FireBalloon)+9, ARecY(FireBalloon)+65);
SetSprite(FireSpeech, 190 + 2*(errCode-100));
AMoveTo(FireSpeech, ARecX(FireBalloon)+10, ARecY(FireBalloon)+14);
AMoveTo(FireClickMe, ARecX(FireBalloon)+35, ARecY(FireBalloon)+68);
Wait(FireBalloon);
Wait(FireSpeech);
Wait(FireClickMe);
Wait(FireLight1);
Wait(FireLight2);
SetIdle(20, "DoFireLight");
EnableActions();
HoldMouseDowns(0);
}
/*-----------------------*/
FireExit( ; x, y)
{
HoldMouseDowns(1);
CancelIdle("DoFireLight");
x = ARecX(FireEngine);
y = ARecY(FireEngine);
if ((x > 0) && (y > 0)) {
AMoveTo(FireClickMe, 0, -200);
AMoveTo(FireSpeech, 0, -200);
AMoveTo(FireLight1, 0, -200);
AMoveTo(FireLight2, 0, -200);
Wait(FireLight1);
Wait(FireLight2);
AMoveTo(FireBalloon, 0, -200);
gSndChannel = PlayConsecutiveSound(91, gSndChannel); /* triangle */
Wait(FireBalloon);
SetSprite(FireEngine, 174);
Wait(FireEngine);
gSndChannel = PlayConsecutiveSound(92, gSndChannel); /* Scram */
AMove(FireEngine, -(gWidth/6), 0);
AMoveTo(FireEngine, 0, -200);
}
gWaitFireClick = 0;
if (gStep24ErrFlag) {
Step24Error();
} else
HoldMouseDowns(0);
}
/*-----------------------*/
FireExitIdle()
{
CancelIdle("FireExitIdle");
FireExit();
if (gCurCheck > 1)
SetIdle(5, "Blinker");
}
/*-----------------------*/
DoFireLight()
{
SetSprite(FireEngine, 174);
APause(FireEngine, 10);
SetSprite(FireEngine, 172);
SetSprite(FireLight2, 184);
SetSprite(FireLight2, 186);
SetSprite(FireLight2, 188);
SetSprite(FireLight2, 182);
APause(FireLight2, 4);
Wait(FireLight2);
SetSprite(FireLight1, 184);
SetSprite(FireLight1, 186);
SetSprite(FireLight1, 188);
SetSprite(FireLight1, 182);
Wait(FireLight1);
SetSprite(FireEngine, 174);
APause(FireEngine, 10);
SetSprite(FireEngine, 172);
ResetIdle("DoFireLight");
}
/**********************************************************/
/*-----------------------*/
WaitASec(a, howMany)
{
APause(a, howMany*60);
Wait(a);
}
/*-----------------------*/
animate_click(;a,ani,handled,mode)
{
handled = 0;
a = CurrentSprite();
if (gWaitFireClick) {
SetIdle(2, "FireExitIdle");
handled = 1;
} else if (gInitialized && (a == StartBtn) && (!gAlreadyStarted)) {
SetIdle(5, "DoStartBtn");
handled = 1;
gAlreadyStarted = 1;
} else if ((a == GetStickerAnim(2, 2)) ||
(a == GetStickerAnim(1, 2)) ||
(a == GetStickerAnim(0, 2)) ||
(a == GetStickerAnim(3, 2)) ||
(a == GetStickerAnim(7, 2))) {
mode = rand(3);
SheBopDanceStart(a, mode);
SheBopDance(a, mode);
handled = 1;
} else if ((a == GetStickerAnim(4, 2)) ||
(a == GetStickerAnim(6, 2)) ||
(a == GetStickerAnim(5, 2)) ||
(a == GetStickerAnim(8, 2))) {
mode = rand(9);
DooWopQuickLick1(a, 110+mode);
handled = 1;
}
return(handled);
}
/*-----------------------*/
formulaBar_enter(; result)
{
/* DebugCode(gCurCheck); */
if (gCurCheck==2) { /* A1 */
result = CompareCellText(0, 0, "DATE");
if (result) {
FireError(result);
} else
Step2();
} else if (gCurCheck==3) { /* B1 */
result = CompareCellText(1, 0, "JOB");
if (result) {
FireError(result);
} else
Step3();
} else if (gCurCheck==4) { /* C1 */
result = CompareCellText(2, 0, "WAGE");
if (result) {
result = CompareCellText(2, 0, "WAGES");
if (result)
FireError(result);
}
if (!result)
Step4();
} else if (gCurCheck==5) { /* D1 */
result = CompareCellText(3, 0, "HOURS");
if (result) {
FireError(result);
} else
Step5();
} else if (gCurCheck==6) { /* E1 */
result = CompareCellText(4, 0, "EARNED");
if (result) {
FireError(result);
} else
Step6();
} else if ((gCurCheck>=21) && (gCurCheck<=24)) { /* E5 */
result = CompareCellText(4, 4, "=E2+E3+E4");
if (result) {
gStep24ErrFlag = 1;
FireError(102);
} else
Step24();
}
return(1);
}
/*-----------------------*/
verify_stickerDrag(;result)
{
if (gCurCheck>25)
result = 1;
else
result = 0;
return(result);
}
/*-----------------------*/
verify_resizeRowCol(;result)
{
result = 0;
if (gCurCheck > 25)
result = 99;
else
result = 0;
return(result);
}
/*-----------------------*/
menu_select(; menuID, menuItem, row, col, selMode, result)
{
result = 1;
menuID = GetLastMenuID();
menuItem = GetLastMenuItem();
if ((menuID > 2) && (gCurCheck<25))
result = 0;
row = GetCurCellRow();
col = GetCurCellCol();
selMode = GetCurSelMode();
if (gCurCheck==8) {
if ((menuID == 10) && (menuItem == 2))
if (SSInFront()) {
if ((col == 0) && (row == 0) && (selMode == 3)) {
Step8();
result = 1;
} else
result = 0;
} else
result = -1;
} else if (gCurCheck==9) {
if ((menuID == 10) && (menuItem == 4))
if (SSInFront()) {
if ((col == 0) && (row == 0) && (selMode == 3)) {
Step9();
result = 1;
} else
result = 0;
} else
result = -1;
} else if (gCurCheck==11) {
if ((menuID == 5) && (menuItem == 10))
if (SSInFront()) {
if ((col == 1) && (row == 0) && (selMode == 2)) {
gDidTheMenu = 1;
result = 1;
} else
result = 0;
} else
result = -1;
} else if (gCurCheck==13) {
if ((menuID == 5) && (menuItem == 10))
if (SSInFront()) {
if (TestSelRect(0,2,99,4)) {
gDidTheMenu = 1;
result = 1;
} else
result = 0;
} else
result = -1;
} else if (gCurCheck==15) {
if ((menuID == 5) && (menuItem == 1))
if (SSInFront()) {
if (TestSelRect(1,2,3,2)) {
gDidTheMenu = 1;
result = 1;
} else
result = 0;
} else
result = -1;
} else if (gCurCheck==17) {
if ((menuID == 5) && (menuItem == 1))
if (SSInFront()) {
if (TestSelRect(1,4,4,4)) {
gDidTheMenu = 1;
result = 1;
} else
result = 0;
} else
result = -1;
} else if (gCurCheck==19) {
if ((menuID == 5) && (menuItem == 1))
if (SSInFront()) {
if (TestSelRect(1,0,3,0)) {
gDidTheMenu = 1;
result = 1;
} else
result = 0;
} else
result = -1;
}
if (result == 0)
FireError(101);
else if (result == -1) {
FireError(104);
result = 0;
}
return(result);
}
/*-----------------------*/
verify_fSelect(;row, col, result)
{
result = 1;
row = GetCurCellRow();
col = GetCurCellCol();
if (gWaitFireClick) {
result = 0;
} else if (gCurCheck==22) {
if ((col == 4) && (row == 4))
if ((result = TestFSelRect(1,4,1,4))) {
Step22();
}
} else if (gCurCheck==23) {
if ((col == 4) && (row == 4))
if ((result = TestFSelRect(2,4,2,4))) {
Step23();
}
} else if (gCurCheck==24) {
if ((col == 4) && (row == 4))
if ((result = TestFSelRect(3,4,3,4))) {
/* do nothing */
}
}
if (!result) {
DoBeep();
result = TestFSelRect(-2,-2,-2,-2);
}
return(1);
}
/*-----------------------*/
formulaBar_type(; row, col, result)
{
result = 0;
row = GetCurCellRow();
col = GetCurCellCol();
if (gCurCheck>25) {
result = 1;
} else if (gWaitFireClick) {
DoBeep();
// SetIdle(2, "FireExitIdle");
} else if (gCurCheck==2) {
if ((col == 0) && (row == 0)) {
result = 1;
} else
result = 0;
} else if (gCurCheck==3) {
if ((col == 1) && (row == 0)) {
result = 1;
} else
result = 0;
} else if (gCurCheck==4) {
if ((col == 2) && (row == 0)) {
result = 1;
} else
result = 0;
} else if (gCurCheck==5) {
if ((col == 3) && (row == 0)) {
result = 1;
} else
result = 0;
} else if (gCurCheck==6) {
if ((col == 4) && (row == 0)) {
result = 1;
} else
result = 0;
} else if ((gCurCheck>=21) && (gCurCheck<=24)) {
if ((col == 4) && (row == 4)) {
result = 1;
if (gCurCheck == 21)
Step21();
} else
result = 0;
}
if ((result == 0) && !gWaitFireClick)
FireError(101);
SetFTypingVerified(result);
return(1);
}
/*-----------------------*/
DoStartBtn(;a)
{
HoldMouseDowns(1);
CancelIdle("DoStartBtn");
gSndChannel = PlayConsecutiveSound(90, gSndChannel); /* saxScram */
NBArrangeWindow(270, 17);
if (gTESTING)
DoTest();
a = GetCheckBox(gCurCheck);
AMoveTo(Pointer, ARecX(a)-41, ARecY(a)-4);
Wait(Pointer);
UnderlineCheckText(gCurCheck);
gBlinkState = 1;
if (gTESTING==0)
SetIdle(5, "Step1");
SetIdle(30, "Blinker");
// HoldMouseDowns(0);
}
/*-----------------------*/
CheckCurBox(halfSecs, whichBox;a, ticks)
{
a = GetCheckBox(whichBox);
gSndChannel = PlayConsecutiveSound(100, gSndChannel); /* check */
SetSprite(a, 152);
ticks = 30 * halfSecs;
if (ticks > 0)
APause(a, ticks);
SetSprite(a, 152);
Wait(a);
}
/*-----------------------*/
DoCheckBox(halfSecs, whichBox ;a)
{
SetSprite(Pointer, 22);
APause(Pointer, 10);
Wait(Pointer);
SetSprite(Pointer, 20);
CheckCurBox(halfSecs, whichBox);
}
/*-----------------------*/
PointToNextStep(;a)
{
a = GetCheckBox(gCurCheck);
SetSprite(Pointer, 22);
AMoveTo(Pointer, ARecX(a)-41, ARecY(a)-4);
APause(Pointer, 40);
Wait(Pointer);
SetSprite(Pointer, 20);
Wait(Pointer);
UnderlineCheckText(gCurCheck);
gBlinkState = 1;
SetIdle(5, "Blinker");
}
/*-----------------------*/
Blinker()
{
//HoldMouseDowns(1);
if (!gWaitFireClick) {
UnderlineCheckText(gCurCheck);
if (gBlinkState == 1) {
gBlinkState = 0;
SetIdle(3, "Blinker");
} else {
gBlinkState = 1;
SetIdle(40, "Blinker");
}
}
//HoldMouseDowns(0);
}
/*-----------------------*/
KillBlinker(whichCheck)
{
CancelIdle("Blinker");
if (gBlinkState == 1) {
UnderlineCheckText(whichCheck);
gBlinkState = 0;
}
}
/*-----------------------*/
SheBopIntro(phrase)
{
if ((phrase <= 0) || (phrase == 2)) {
gSndChannel = PlayConsecutiveSound(201, gSndChannel); /* triangle */
} else if (phrase == 1) {
gSndChannel = PlayConsecutiveSound(90, gSndChannel); /* saxScram */
gSndChannel = PlayConsecutiveSound(91, gSndChannel); /* triangle2 */
}
}
/*-----------------------*/
SheBopMusic(phrase)
{
if (phrase <= 0) {
gSndChannel = PlayConsecutiveSound(205, gSndChannel); /* congas 1 */
gSndChannel = PlayConsecutiveSound(206, gSndChannel); /* congas 2 */
} else if (phrase == 1) {
gSndChannel = PlayConsecutiveSound(206, gSndChannel); /* congas 2 */
gSndChannel = PlayConsecutiveSound(207, gSndChannel); /* congas 3 */
} else if (phrase >= 2) {
gSndChannel = PlayConsecutiveSound(205, gSndChannel); /* congas 1 */
gSndChannel = PlayConsecutiveSound(206, gSndChannel); /* congas 2 */
gSndChannel = PlayConsecutiveSound(207, gSndChannel); /* congas 3 */
}
}
/*-----------------------*/
SheBopOutro(phrase)
{
if ((phrase <= 0) || (phrase == 2)) {
gSndChannel = PlayConsecutiveSound(204, gSndChannel); /* whistle */
} else if ((phrase == 1) || (phrase == 3)) {
gSndChannel = PlayConsecutiveSound(200, gSndChannel); /* shaker */
}
}
/*-----------------------*/
SheBopDanceStart(ani, mode;)
{
Wait(ani);
SheBopIntro(mode);
SetSprite(ani, 104);
SetSprite(ani, 108);
APause(ani, 10);
Wait(ani);
SetSprite(ani, 104);
SetSprite(ani, 102);
Wait(ani);
SetSprite(ani, 102);
while(SoundsToPlay(gSndChannel)) {} ;
}
/*-----------------------*/
SheBopDance(ani, mode;)
{
SetSprite(ani, 104);
Wait(ani);
SheBopMusic(mode);
SetSprite(ani, 104);
SetSprite(ani, 106);
SetSprite(ani, 104);
SetSprite(ani, 106);
while(SoundsToPlay(gSndChannel))
{
SetSprite(ani, 108);
SetSprite(ani, 110);
Wait(ani);
SetSprite(ani, 110);
}
SheBopOutro(mode);
SetSprite(ani, 106);
SetSprite(ani, 104);
SetSprite(ani, 102);
}
/*-----------------------*/
SheBopPuzzled(ani;saveDelay)
{
saveDelay = GetADelay();
SetADelay(8);
Wait(ani);
gSndChannel = PlayConsecutiveSound(90, gSndChannel); /* saxScram */
gSndChannel = PlayConsecutiveSound(91, gSndChannel); /* triangle2 */
SetSprite(ani, 104);
SetSprite(ani, 108);
SetSprite(ani, 104);
SetSprite(ani, 102);
Wait(ani);
while(SoundsToPlay(gSndChannel)) {} ;
gSndChannel = PlayConsecutiveSound(204, gSndChannel); /* whistle */
SetSprite(ani, 114);
APause(ani, 120);
SetSprite(ani, 114);
SetADelay(saveDelay);
}
/*-----------------------*/
DooWopDispatch(num, riff)
{
ani = GetStickerAnim(num, 2);
if (riff==1)
DooWopQuickLick1(ani, 114);
else if (riff==2)
DooWopQuickLick1(ani, 113);
else if (riff==3)
DooWopQuickLick3(ani);
else
DooWopQuickLick2(ani);
}
/*-----------------------*/
DooWopQuickLick1(ani, num ; saveDelay)
{
saveDelay = GetADelay();
SetADelay(16);
SetSprite(ani, 130);
Wait(ani);
gSndChannel = PlayConsecutiveSound(num, gSndChannel); /* squeek up */
SetSprite(ani, 126);
SetSprite(ani, 124);
Wait(ani);
while(SoundsToPlay(gSndChannel)) {} ;
SetSprite(ani, 122);
Wait(ani);
SetADelay(saveDelay);
}
/*-----------------------*/
DooWopQuickLick2(ani; saveDelay)
{
saveDelay = GetADelay();
SetADelay(15);
SetSprite(ani, 124);
Wait(ani);
gSndChannel = PlayConsecutiveSound(112, gSndChannel); /* riff 3 */
SetSprite(ani, 126);
SetSprite(ani, 124);
SetSprite(ani, 126);
SetSprite(ani, 124);
Wait(ani);
while(SoundsToPlay(gSndChannel)) {} ;
SetSprite(ani, 126);
Wait(ani);
gSndChannel = PlayConsecutiveSound(117, gSndChannel); /* zot! */
while(SoundsToPlay(gSndChannel)) {} ;
SetSprite(ani, 122);
Wait(ani);
SetADelay(saveDelay);
}
/*-----------------------*/
DooWopQuickLick3(ani; saveDelay)
{
saveDelay = GetADelay();
SetADelay(16);
SetSprite(ani, 124);
Wait(ani);
gSndChannel = PlayConsecutiveSound(110, gSndChannel); /* riff 1a */
SetSprite(ani, 124);
SetSprite(ani, 128);
SetSprite(ani, 124);
Wait(ani);
while(SoundsToPlay(gSndChannel)) {} ;
SetSprite(ani, 124);
Wait(ani);
gSndChannel = PlayConsecutiveSound(111, gSndChannel); /* riff 1b */
SetSprite(ani, 126);
APause(ani,20);
SetSprite(ani, 124);
Wait(ani);
while(SoundsToPlay(gSndChannel)) {} ;
SetSprite(ani, 122);
Wait(ani);
SetADelay(saveDelay);
}
/*-----------------------*/
SheBopFinale(; ani)
{
ani = GetStickerAnim(7, 2);
// SheBopDanceStart(ani, 2);
gCurCheck = 25;
UnderlineCheckText(gCurCheck);
CheckCurBox(3, gCurCheck);
UnderlineCheckText(gCurCheck);
gCurCheck = gCurCheck + 1;
UnderlineCheckText(gCurCheck);
CheckCurBox(3, gCurCheck);
UnderlineCheckText(gCurCheck);
gCurCheck = gCurCheck + 1;
UnderlineCheckText(gCurCheck);
CheckCurBox(3, gCurCheck);
UnderlineCheckText(gCurCheck);
SheBopDance(ani, 3);
}
/*-----------------------*/
CheckIt()
{
gCurCheck = gCurCheck + 1;
KillBlinker(gCurCheck-1);
DoCheckBox(0, gCurCheck-1);
}
/*-----------------------*/
Step1(;row,col)
{
HoldMouseDowns(1);
row = GetCurCellRow();
col = GetCurCellCol();
if ((col == 0) && (row == 0)) { /* A1 */
CancelIdle("Step1");
CheckIt();
NBScrollForRange(16, 33);
PointToNextStep();
/* formulaBar_type & formulaBar_enter handle next step */
} else
ResetIdle("Step1");
HoldMouseDowns(0);
}
/*-----------------------*/
Step2()
{
HoldMouseDowns(1);
CheckIt();
NBScrollForRange(26, 33);
PointToNextStep();
/* formulaBar_type & formulaBar_enter handle next step */
HoldMouseDowns(0);
}
/*-----------------------*/
Step3()
{
HoldMouseDowns(1);
CheckIt();
NBScrollForRange(26, 33);
PointToNextStep();
/* formulaBar_type & formulaBar_enter handle next step */
HoldMouseDowns(0);
}
/*-----------------------*/
Step4()
{
HoldMouseDowns(1);
CheckIt();
NBScrollForRange(26, 33);
PointToNextStep();
/* formulaBar_type & formulaBar_enter handle next step */
HoldMouseDowns(0);
}
/*-----------------------*/
Step5()
{
HoldMouseDowns(1);
CheckIt();
NBScrollForRange(27, 33);
PointToNextStep();
/* formulaBar_type & formulaBar_enter handle next step */
HoldMouseDowns(0);
}
/*-----------------------*/
Step6(;ani)
{
HoldMouseDowns(1);
DisableActions();
CheckIt();
NBScrollForRange(38, 48);
PointToNextStep();
ani = GetStickerAnim(1, 2);
SheBopDance(ani, 1);
SetIdle(2, "Step7");
//HoldMouseDowns(0);
EnableActions();
}
/*-----------------------*/
Step7(;row,col,selMode)
{
HoldMouseDowns(1);
row = GetCurCellRow();
col = GetCurCellCol();
selMode = GetCurSelMode();
if ((col == 0) && (row == 0) && (selMode == 3)) {
CancelIdle("Step7");
CheckIt();
NBScrollForRange(38, 48);
PointToNextStep();
TurnOnMenu(10,2); /*Format->Font Style->Bold */
/* menu_select handles next step */
} else
ResetIdle("Step7");
HoldMouseDowns(0);
}
/*-----------------------*/
Step8()
{
HoldMouseDowns(1);
CheckIt();
NBScrollForRange(38, 48);
PointToNextStep();
MenusOnOff(0); /* turn off menus */
TurnOnMenu(10,4); /*Format->Font Style->Underline */
/* menu_select handles next step */
HoldMouseDowns(0);
}
/*-----------------------*/
Step9()
{
HoldMouseDowns(1);
DisableActions();
// CheckIt();
KillBlinker(gCurCheck);
DoCheckBox(0, gCurCheck);
MenusOnOff(0); /* turn off menus */
NBScrollForRange(49, 63);
DooWopDispatch(5, 114);
gCurCheck = gCurCheck + 1;
PointToNextStep();
SetIdle(2, "Step10");
// HoldMouseDowns(0);
EnableActions();
}
/*-----------------------*/
Step10(;row,col,selMode)
{
HoldMouseDowns(1);
row = GetCurCellRow();
col = GetCurCellCol();
selMode = GetCurSelMode();
if ((col == 1) && (row == 0) && (selMode == 2)) {
CancelIdle("Step10");
CheckIt();
NBScrollForRange(49, 63);
PointToNextStep();
TurnOnMenu(5,10); /*Format->Column Width */
gDidTheMenu = 0;
SetIdle(2, "Step11");
} else {
ResetIdle("Step10");
HoldMouseDowns(0);
}
}
/*-----------------------*/
Step11(;width)
{
HoldMouseDowns(1);
width = GetColWidth(1);
if (width == 110) {
CancelIdle("Step11");
CheckIt();
MenusOnOff(0); /* turn off menus */
NBScrollForRange(57, 64);
PointToNextStep();
SetIdle(2, "Step12");
} else {
if (gDidTheMenu) {
FireError(102);
gDidTheMenu = 0;
}
ResetIdle("Step11");
HoldMouseDowns(0);
}
}
/*-----------------------*/
Step12()
{
HoldMouseDowns(1);
if (TestSelRect(0,2,99,4)) {
CancelIdle("Step12");
CheckIt();
NBScrollForRange(57, 64);
PointToNextStep();
TurnOnMenu(5,10); /*Format->Column Width */
gDidTheMenu = 0;
SetIdle(2, "Step13");
} else {
ResetIdle("Step12");
HoldMouseDowns(0);
}
}
/*-----------------------*/
Step13(;width,ani)
{
HoldMouseDowns(1);
width = GetColWidth(3);
if (width == 55) {
DisableActions();
CancelIdle("Step13");
// CheckIt();
KillBlinker(gCurCheck);
DoCheckBox(0, gCurCheck);
MenusOnOff(0); /* turn off menus */
NBScrollForRange(66, 82);
ani = GetStickerAnim(0, 2);
SheBopDance(ani, 1);
gCurCheck = gCurCheck + 1;
PointToNextStep();
SetIdle(2, "Step14");
EnableActions();
} else {
if (gDidTheMenu) {
FireError(102);
gDidTheMenu = 0;
}
ResetIdle("Step13");
HoldMouseDowns(0);
}
}
/*-----------------------*/
Step14()
{
HoldMouseDowns(1);
if (TestSelRect(1,2,3,2)) {
CancelIdle("Step14");
CheckIt();
NBScrollForRange(66, 82);
PointToNextStep();
TurnOnMenu(5,1); /*Format->Cell Attributes */
gDidTheMenu = 0;
SetIdle(2, "Step15");
} else {
ResetIdle("Step14");
HoldMouseDowns(0);
}
}
/*-----------------------*/
Step15(;numForm, decPlaces, format)
{
HoldMouseDowns(1);
numForm = GetCellNumForm(2,1);
decPlaces = numForm % 16;
format = numForm / 16;
if ((format == 3) && (decPlaces == 2)) {
CancelIdle("Step15");
CheckIt();
MenusOnOff(0); /* turn off menus */
NBScrollForRange(75, 82);
PointToNextStep();
SetIdle(2, "Step16");
} else {
if (gDidTheMenu) {
FireError(102);
gDidTheMenu = 0;
}
ResetIdle("Step15");
HoldMouseDowns(0);
}
}
/*-----------------------*/
Step16()
{
HoldMouseDowns(1);
if (TestSelRect(1,4,4,4)) {
CancelIdle("Step16");
CheckIt();
NBScrollForRange(75, 82);
PointToNextStep();
TurnOnMenu(5,1); /*Format->Cell Attributes */
gDidTheMenu = 0;
SetIdle(2, "Step17");
} else {
ResetIdle("Step16");
HoldMouseDowns(0);
}
}
/*-----------------------*/
Step17(;numForm, decPlaces, format, ani)
{
HoldMouseDowns(1);
numForm = GetCellNumForm(4,1);
decPlaces = numForm % 16;
format = numForm / 16;
if ((format == 3) && (decPlaces == 2)) {
DisableActions();
CancelIdle("Step17");
// CheckIt();
KillBlinker(gCurCheck);
DoCheckBox(0, gCurCheck);
MenusOnOff(0); /* turn off menus */
NBScrollForRange(86, 98);
ani = GetStickerAnim(3, 2);
SheBopDance(ani, 1);
gCurCheck = gCurCheck + 1;
PointToNextStep();
SetIdle(2, "Step18");
EnableActions();
} else {
if (gDidTheMenu) {
FireError(102);
gDidTheMenu = 0;
}
ResetIdle("Step17");
HoldMouseDowns(0);
}
}
/*-----------------------*/
Step18()
{
HoldMouseDowns(1);
if (TestSelRect(1,0,3,0)) {
CancelIdle("Step18");
CheckIt();
NBScrollForRange(86, 98);
PointToNextStep();
TurnOnMenu(5,1); /*Format->Cell Attributes */
gDidTheMenu = 0;
SetIdle(2, "Step19");
} else {
ResetIdle("Step18");
HoldMouseDowns(0);
}
}
/*-----------------------*/
Step19(;numForm, format)
{
HoldMouseDowns(1);
numForm = GetCellNumForm(0,1);
format = numForm / 16;
if ((format >= 8) && (format <= 13)) {
DisableActions();
CancelIdle("Step19");
// CheckIt();
KillBlinker(gCurCheck);
DoCheckBox(0, gCurCheck);
MenusOnOff(0); /* turn off menus */
NBScrollForRange(99, 112);
DooWopDispatch(6, 113);
gCurCheck = gCurCheck + 1;
PointToNextStep();
SetIdle(2, "Step20");
EnableActions();
} else {
if (gDidTheMenu) {
FireError(102);
gDidTheMenu = 0;
}
ResetIdle("Step19");
HoldMouseDowns(0);
}
}
/*-----------------------*/
Step20(;row,col)
{
HoldMouseDowns(1);
row = GetCurCellRow();
col = GetCurCellCol();
if ((col == 4) && (row == 4)) {
CancelIdle("Step20");
CheckIt();
NBScrollForRange(102, 112);
PointToNextStep();
} else
ResetIdle("Step20");
HoldMouseDowns(0);
}
/*-----------------------*/
Step21()
{
HoldMouseDowns(1);
CheckIt();
NBScrollForRange(103, 112);
PointToNextStep();
HoldMouseDowns(0);
}
/*-----------------------*/
Step22()
{
HoldMouseDowns(1);
CheckIt();
NBScrollForRange(104, 112);
PointToNextStep();
HoldMouseDowns(0);
}
/*-----------------------*/
Step23()
{
HoldMouseDowns(1);
CheckIt();
NBScrollForRange(105, 112);
PointToNextStep();
HoldMouseDowns(0);
}
/*-----------------------*/
Step24Error(;a, i)
{
// HoldMouseDowns(1);
gSndChannel = PlayConsecutiveSound(92, gSndChannel); /* Scram */
KillBlinker(gCurCheck);
for (i=gCurCheck-1;i>=20;i--) {
a = GetCheckBox(i);
SetSprite(a, 150);
Wait(a);
}
gCurCheck = 20;
NBScrollForRange(102, 112);
PointToNextStep();
gStep24ErrFlag = 0;
SetIdle(2, "Step20");
// HoldMouseDowns(0);
}
/*-----------------------*/
Step24()
{
HoldMouseDowns(1);
DisableActions();
KillBlinker(gCurCheck);
AMoveTo(Pointer,0, -100);
DoCheckBox(0, gCurCheck);
gCurCheck = gCurCheck + 1;
while (gCurCheck < 25) {
DoCheckBox(0, gCurCheck);
gCurCheck = gCurCheck + 1;
}
NBScrollForRange(115, 132);
DooWopDispatch(8, 4);
SheBopFinale();
MenusOnOff(1); /* turn on menus */
NBScrollForRange(118, 130);
EnableActions();
HoldMouseDowns(0);
}
/*-----------------------*/
Àá